package cn.iocoder.aics.module.member.controller.app.chathistory.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Message {
    private String role;  // user/assistant/system
    private String content;

    // 自动清理特殊字符
    public String getContent() {
        return content.replaceAll("[\\x00-\\x1F]",  "");
    }
}